package gtt

import "time"

func (this Bus) Emit(Name string, data []byte) {
	ReceiveName, ReceiveId := getName(Name)
	gtt.DataAllChan <- Data{
		SendName:    this.Name,
		SendId:      this.Id,
		ReceiveName: ReceiveName,
		ReceiveId:   ReceiveId,
		Data:        data,
		Time:        time.Now().Unix(),
	}
}
